mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-07-25 00:19:49 +02:00
Automatically detects working compiler. Automatically detects host CUDA arch, can be overriden by setting CUDAARCHS env var. Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/34547 Signed-off-by: Sam James <sam@gentoo.org>
18 lines
729 B
Diff
18 lines
729 B
Diff
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -184,6 +184,7 @@ if(NOT MSVC)
|
|
ei_add_cxx_compiler_flag("-wd2304") # disable ICC's "warning #2304: non-explicit constructor with single argument may cause implicit type conversion" produced by -Wnon-virtual-dtor
|
|
|
|
|
|
+ if(NOT EIGEN_TEST_CXX11)
|
|
# The -ansi flag must be added last, otherwise it is also used as a linker flag by check_cxx_compiler_flag making it fails
|
|
# Moreover we should not set both -strict-ansi and -ansi
|
|
check_cxx_compiler_flag("-strict-ansi" COMPILER_SUPPORT_STRICTANSI)
|
|
@@ -194,6 +195,7 @@ if(NOT MSVC)
|
|
else()
|
|
ei_add_cxx_compiler_flag("-ansi")
|
|
endif()
|
|
+ endif()
|
|
|
|
if(ANDROID_NDK)
|
|
ei_add_cxx_compiler_flag("-pie")
|