Skip to content

Commit

Permalink
fixed build issue on clang
Browse files Browse the repository at this point in the history
  • Loading branch information
JessyDL committed May 20, 2023
1 parent c44cde1 commit d516bb8
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,10 @@ endif()
set_property(TARGET strtype PROPERTY FOLDER "extern")

# setup cppfront which lacks a cmake integration
add_executable(cppfront_compiler cppfront/source/cppfront.cpp)
set_target_properties(
cppfront_compiler
PROPERTIES
OUTPUT_NAME cppfront
EXPORT_NAME cppfront
)
target_compile_features(cppfront_compiler PRIVATE cxx_std_20)

add_library(cppfront_interface INTERFACE)
target_compile_features(cppfront_interface INTERFACE cxx_std_20)
target_sources(
cppfront_interface
INTERFACE
FILE_SET HEADERS
BASE_DIRS cppfront/include
FILES cppfront/include/cpp2util.h
)
add_executable(cppfront_compiler "${CMAKE_CURRENT_SOURCE_DIR}/cppfront/source/cppfront.cpp")
target_include_directories(cppfront_compiler PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/cppfront/source")
set_target_properties(cppfront_compiler PROPERTIES CXX_STANDARD 20 CXX_STANDARD_REQUIRED TRUE OUTPUT_NAME cppfront EXPORT_NAME cppfront)

add_library(cppfront_interface INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/cppfront/include/cpp2util.h")
set_target_properties(cppfront_interface PROPERTIES CXX_STANDARD 20 CXX_STANDARD_REQUIRED TRUE)
target_include_directories(cppfront_interface SYSTEM INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/cppfront/include>")

0 comments on commit d516bb8

Please sign in to comment.