-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only require C compiler #1424
Only require C compiler #1424
Conversation
By default the loader only requires the C compiler. But by default the C and CXX compilers are enabled. Only enable the C compiler. Move corresponding C++ code into tests directory.
CI Vulkan-Loader build queued with queue ID 107767. |
CI Vulkan-Loader build # 2433 running. |
CI Vulkan-Loader build # 2433 passed. |
set(THREADS_PREFER_PTHREAD_FLAG ON) | ||
find_package(Threads REQUIRED) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On WIN32 this just ends up wasting time.
# using GCC or Clang with the regular front end | ||
if (ENABLE_WERROR) | ||
target_compile_options(loader_common_options INTERFACE -Werror) | ||
endif() | ||
target_compile_options(loader_common_options INTERFACE -Wall -Wextra) | ||
endif() | ||
|
||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") | ||
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regex handles this all nicely
if (BUILD_TESTS) | ||
enable_testing() | ||
add_subdirectory(tests) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much cleaner/simpler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
By default the loader only requires the C compiler.
But by default the C and CXX compilers are enabled.
Only enable the C compiler. Move corresponding C++ code into tests directory.