Skip to content

Commit

Permalink
Add double quotes to prevent configure failures when toggling potenti…
Browse files Browse the repository at this point in the history
…ally empty OpenMP variables
  • Loading branch information
keadyk authored and KineticTheory committed Feb 8, 2023
1 parent bd0c69e commit 75ed2e7
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions config/Linux-NVHPC-Fortran.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -------------------------------------------*-cmake-*-------------------------------------------- #
# file config/Linux-NVHPC-Fortran.cmake
# brief Establish Fortran flags for Linux - NVHPC
# note Copyright (C) 2022 Triad National Security, LLC., All rights reserved.
# note Copyright (C) 2022-2023 Triad National Security, LLC., All rights reserved.
# ------------------------------------------------------------------------------------------------ #

include_guard(GLOBAL)
Expand Down Expand Up @@ -29,7 +29,7 @@ endif()
deduplicate_flags(CMAKE_Fortran_FLAGS)

# Toggle compiler flags for optional features
toggle_compiler_flag(OpenMP_FOUND ${OpenMP_Fortran_FLAGS} "Fortran" "")
toggle_compiler_flag(OpenMP_FOUND "${OpenMP_Fortran_FLAGS}" "Fortran" "")
force_compiler_flags_to_cache("Fortran")

# ------------------------------------------------------------------------------------------------ #
Expand Down
4 changes: 2 additions & 2 deletions config/unix-crayCC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# author Kelly Thompson
# date 2010 Nov 1
# brief Establish flags for Linux64 - Cray C/C++
# note Copyright (C) 2015-2022 Triad National Security, LLC., All rights reserved.
# note Copyright (C) 2015-2023 Triad National Security, LLC., All rights reserved.
# ------------------------------------------------------------------------------------------------ #

include_guard(GLOBAL)
Expand Down Expand Up @@ -50,7 +50,7 @@ endif()
deduplicate_flags(CMAKE_C_FLAGS)
deduplicate_flags(CMAKE_CXX_FLAGS)

toggle_compiler_flag(OpenMP_FOUND ${OpenMP_C_FLAGS} "C;CXX" "")
toggle_compiler_flag(OpenMP_FOUND "${OpenMP_C_FLAGS}" "C;CXX" "")
force_compiler_flags_to_cache("C;CXX")

# ------------------------------------------------------------------------------------------------ #
Expand Down
4 changes: 2 additions & 2 deletions config/unix-crayftn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# author Kelly Thompson
# date 2008 May 30
# brief Establish flags for Unix - Cray Fortran
# note Copyright (C) 2015-2022 Triad National Security, LLC., All rights reserved.
# note Copyright (C) 2015-2023 Triad National Security, LLC., All rights reserved.
# ------------------------------------------------------------------------------------------------ #

include_guard(GLOBAL)
Expand Down Expand Up @@ -39,7 +39,7 @@ endif()
# ------------------------------------------------------------------------------------------------ #
# Ensure cache values always match current selection
deduplicate_flags(CMAKE_Fortran_FLAGS)
toggle_compiler_flag(OpenMP_FOUND ${OpenMP_Fortran_FLAGS} "Fortran" "")
toggle_compiler_flag(OpenMP_FOUND "${OpenMP_Fortran_FLAGS}" "Fortran" "")
force_compiler_flags_to_cache("Fortran")

# ------------------------------------------------------------------------------------------------ #
Expand Down
4 changes: 2 additions & 2 deletions config/unix-flang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# author Kelly Thompson
# date Sunday, Apr 29, 2018, 19:56 pm
# brief Establish flags for Unix/Linux - Gnu Fortran
# note Copyright (C) 2018-2022 Triad National Security, LLC., All rights reserved.
# note Copyright (C) 2018-2023 Triad National Security, LLC., All rights reserved.
# ------------------------------------------------------------------------------------------------ #

if(NOT Fortran_FLAGS_INITIALIZED)
Expand Down Expand Up @@ -31,7 +31,7 @@ deduplicate_flags(CMAKE_Fortran_FLAGS)

# Toggle compiler flags for optional features
if(OpenMP_Fortran_FLAGS)
toggle_compiler_flag(OpenMP_FOUND ${OpenMP_Fortran_FLAGS} "Fortran" "")
toggle_compiler_flag(OpenMP_FOUND "${OpenMP_Fortran_FLAGS}" "Fortran" "")
endif()
force_compiler_flags_to_cache("Fortran")

Expand Down
4 changes: 2 additions & 2 deletions config/unix-ifort.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# author Kelly Thompson
# date 2008 May 30
# brief Establish flags for Unix - Intel Fortran
# note Copyright (C) 2010-2022 Triad National Security, LLC., All rights reserved.
# note Copyright (C) 2010-2023 Triad National Security, LLC., All rights reserved.
# ------------------------------------------------------------------------------------------------ #

#
Expand Down Expand Up @@ -51,7 +51,7 @@ deduplicate_flags(CMAKE_Fortran_FLAGS)
if(NOT ${SITENAME} STREQUAL "Trinitite")
toggle_compiler_flag(ENABLE_SSE "-mia32 -axSSSE3" "Fortran" "") # sse3, ssse3
endif()
toggle_compiler_flag(OpenMP_FOUND ${OpenMP_Fortran_FLAGS} "Fortran" "")
toggle_compiler_flag(OpenMP_FOUND "${OpenMP_Fortran_FLAGS}" "Fortran" "")
force_compiler_flags_to_cache("Fortran")

# ------------------------------------------------------------------------------------------------ #
Expand Down
4 changes: 2 additions & 2 deletions config/unix-ifx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# author Kelly Thompson <[email protected]>
# date Wednesday, May 26, 2021, 14:12 pm
# brief Establish flags for Unix - Intel OneAPI Fortran (ifx)
# note Copyright (C) 2021-2022 Triad National Security, LLC., All rights reserved.
# note Copyright (C) 2021-2023 Triad National Security, LLC., All rights reserved.
# ------------------------------------------------------------------------------------------------ #

#
Expand Down Expand Up @@ -46,7 +46,7 @@ deduplicate_flags(CMAKE_Fortran_FLAGS)
if(NOT ${SITENAME} STREQUAL "Trinitite")
toggle_compiler_flag(ENABLE_SSE "-mia32 -axSSSE3" "Fortran" "") # sse3, ssse3
endif()
toggle_compiler_flag(OpenMP_FOUND ${OpenMP_Fortran_FLAGS} "Fortran" "")
toggle_compiler_flag(OpenMP_FOUND "${OpenMP_Fortran_FLAGS}" "Fortran" "")
force_compiler_flags_to_cache("Fortran")

# ------------------------------------------------------------------------------------------------ #
Expand Down
4 changes: 2 additions & 2 deletions config/unix-intel.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# author Kelly Thompson
# date 2010 Nov 1
# brief Establish flags for Linux64 - Intel C++
# note Copyright (C) 2010-2022 Triad National Security, LLC., All rights reserved.
# note Copyright (C) 2010-2023 Triad National Security, LLC., All rights reserved.
# ------------------------------------------------------------------------------------------------ #

# Compiler Flags
Expand Down Expand Up @@ -67,7 +67,7 @@ if(NOT CMAKE_CXX_COMPILER_WRAPPER STREQUAL CrayPrgEnv AND NOT IS_DIRECTORY "/ccs
set(HAS_XHOST TRUE)
toggle_compiler_flag(HAS_XHOST "-xHost" "C;CXX" "")
endif()
toggle_compiler_flag(OpenMP_FOUND ${OpenMP_C_FLAGS} "C;CXX" "")
toggle_compiler_flag(OpenMP_FOUND "${OpenMP_C_FLAGS}" "C;CXX" "")
force_compiler_flags_to_cache("C;CXX")

# ------------------------------------------------------------------------------------------------ #
Expand Down
4 changes: 2 additions & 2 deletions config/unix-intelllvm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# author Kelly Thompson <[email protected]>
# date Wednesday, May 26, 2021, 13:44 pm
# brief Establish flags for Linux64 - Intel C++ (LLVM)
# note Copyright (C) 2021-2022 Triad National Security, LLC., All rights reserved.
# note Copyright (C) 2021-2023 Triad National Security, LLC., All rights reserved.
# ------------------------------------------------------------------------------------------------ #

# cmake-lint: disable=C0301
Expand Down Expand Up @@ -57,7 +57,7 @@ if(NOT CMAKE_CXX_COMPILER_WRAPPER STREQUAL CrayPrgEnv AND NOT IS_DIRECTORY "/ccs
set(HAS_XHOST TRUE)
toggle_compiler_flag(HAS_XHOST "-xHost" "C;CXX" "")
endif()
toggle_compiler_flag(OpenMP_FOUND ${OpenMP_C_FLAGS} "C;CXX" "")
toggle_compiler_flag(OpenMP_FOUND "${OpenMP_C_FLAGS}" "C;CXX" "")
force_compiler_flags_to_cache("C;CXX")

# ------------------------------------------------------------------------------------------------ #
Expand Down
4 changes: 2 additions & 2 deletions config/unix-pgf90.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# author Kelly Thompson
# date 2011 June 7
# brief Establish flags for Unix - PGI Fortran
# note Copyright (C) 2011-2022 Triad National Security, LLC., All rights reserved.
# note Copyright (C) 2011-2023 Triad National Security, LLC., All rights reserved.
# ------------------------------------------------------------------------------------------------ #

#
Expand All @@ -29,7 +29,7 @@ endif()
deduplicate_flags(CMAKE_Fortran_FLAGS)

# Toggle compiler flags for optional features
toggle_compiler_flag(OpenMP_FOUND ${OpenMP_Fortran_FLAGS} "Fortran" "")
toggle_compiler_flag(OpenMP_FOUND "${OpenMP_Fortran_FLAGS}" "Fortran" "")
force_compiler_flags_to_cache("Fortran")

# ------------------------------------------------------------------------------------------------ #
Expand Down

0 comments on commit 75ed2e7

Please sign in to comment.