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

Permit compiling on Win32 using Clang #2492

Closed
mdavis199 opened this issue Jul 28, 2022 · 1 comment
Closed

Permit compiling on Win32 using Clang #2492

mdavis199 opened this issue Jul 28, 2022 · 1 comment
Labels
Building and Packaging Issues affecting build/packaging scripts and utilities

Comments

@mdavis199
Copy link

I am using clang version 14.0.6 on Windows. The compiler options file-prefix-map is invalid for this platform.

If you could just surround the following function with if(NOT WIN32) ... endif(), it would be fantastic.

# Adds flags required for reproducible build to the target
# Currently only supports GCC and Clang
function(add_build_reproducibility_settings target)
# Make the build reproducible on versions of g++ and clang that supports -ffile-prefix-map
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 8) OR
("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 10))
target_compile_options(${target} PRIVATE "-ffile-prefix-map=${CATCH_DIR}=.")
endif()
endfunction()

@horenmar
Copy link
Member

horenmar commented Oct 5, 2022

#2517

@horenmar horenmar closed this as completed Oct 5, 2022
@horenmar horenmar added the Building and Packaging Issues affecting build/packaging scripts and utilities label Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Building and Packaging Issues affecting build/packaging scripts and utilities
Projects
None yet
Development

No branches or pull requests

2 participants