Skip to content
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

Merged
merged 1 commit into from
Dec 28, 2023
Merged

Only require C compiler #1424

merged 1 commit into from
Dec 28, 2023

Conversation

juan-lunarg
Copy link
Contributor

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.

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.
@juan-lunarg juan-lunarg added the build Anything to do with building the repo label Dec 28, 2023
@ci-tester-lunarg
Copy link

CI Vulkan-Loader build queued with queue ID 107767.

@ci-tester-lunarg
Copy link

CI Vulkan-Loader build # 2433 running.

@ci-tester-lunarg
Copy link

CI Vulkan-Loader build # 2433 passed.

Comment on lines -23 to -25
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

Copy link
Contributor Author

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")
Copy link
Contributor Author

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

Comment on lines +239 to +241
if (BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much cleaner/simpler.

Copy link
Collaborator

@charles-lunarg charles-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@charles-lunarg charles-lunarg merged commit a3b11f1 into KhronosGroup:main Dec 28, 2023
42 checks passed
@juan-lunarg juan-lunarg deleted the juan/cmake_cleanup branch December 28, 2023 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Anything to do with building the repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants