Skip to content

Commit

Permalink
CMake: fix bug introduced in PR #996 (#1009)
Browse files Browse the repository at this point in the history
  • Loading branch information
mic84 authored Jun 12, 2020
1 parent c69e431 commit 33a35a8
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions Tools/CMake/AMReXFlagsTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,20 @@ target_compile_options( Flags_CXX_REQUIRED

# Currently can't make this a generator expression as amrex_evaluate_genex fails
# to parse it and propagate the flags to cuda
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CXX_COMPILER_VERSION VERSION_LESS 19.26)
target_compile_options( Flags_CXX_REQUIRED
INTERFACE
$<${_cxx_msvc}:/experimental:preprocessor /Zc:preprocessor>
)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
if (CXX_COMPILER_VERSION VERSION_LESS 19.26)
target_compile_options( Flags_CXX_REQUIRED
INTERFACE
$<${_cxx_msvc}:/experimental:preprocessor>
)
else ()
target_compile_options( Flags_CXX_REQUIRED
INTERFACE
$<${_cxx_msvc}:/Zc:preprocessor>
)
endif ()
endif()

#
# Fortran REQUIRED flags -- This is for internal use only: it is useless to export it
#
Expand Down

0 comments on commit 33a35a8

Please sign in to comment.