File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,17 @@ if (CMAKE_CXX_COMPILER_ID IN_LIST GNU_LIKE_FRONTENDS)
2020 -freciprocal-math
2121 -fmerge-all -constants
2222 -ftree-vectorize
23+ -fimplicit-constexpr
2324 )
24- # if the compiler does support -fimplicit-constexpr add it
25- check_cxx_compiler_flag("-fimplicit-constexpr" COMPILER_SUPPORTS_FIMPLICIT_CONSTEXPR)
26- if (COMPILER_SUPPORTS_FIMPLICIT_CONSTEXPR)
27- list (APPEND FINUFFT_CXX_FLAGS_RELEASE -fimplicit-constexpr)
28- endif ()
25+ # Assuming FINUFFT_CXX_FLAGS_RELEASE is already defined
26+ foreach (flag ${FINUFFT_CXX_FLAGS_RELEASE} )
27+ check_cxx_compiler_flag("${flag} " flag_supported)
28+ if (NOT flag_supported)
29+ list (REMOVE_ITEM FINUFFT_CXX_FLAGS_RELEASE "${flag} " )
30+ message (STATUS "Flag ${flag} is not supported by the compiler and will be removed." )
31+ endif ()
32+ endforeach ()
33+
2934 set (FINUFFT_CXX_FLAGS_RELWITHDEBINFO -g ${FINUFFT_CXX_FLAGS_RELEASE} )
3035endif ()
3136
You can’t perform that action at this time.
0 commit comments