From d340fe991da7f9cb3fd9a50b197a63d2a8d680d1 Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Wed, 15 Sep 2021 14:34:47 -0400 Subject: app-arch/precomp-cpp: new package --- .../files/add_compile_definitions.patch | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 app-arch/precomp-cpp/files/add_compile_definitions.patch (limited to 'app-arch/precomp-cpp/files') diff --git a/app-arch/precomp-cpp/files/add_compile_definitions.patch b/app-arch/precomp-cpp/files/add_compile_definitions.patch new file mode 100644 index 0000000..d66cfca --- /dev/null +++ b/app-arch/precomp-cpp/files/add_compile_definitions.patch @@ -0,0 +1,28 @@ +From 730a7ab72b80f89bb89152e8e5ef555dacf05a45 Mon Sep 17 00:00:00 2001 +From: "Alex Xu (Hello71)" +Date: Sat, 11 Sep 2021 13:32:57 -0400 +Subject: [PATCH] use add_compile_definitions instead of CMAKE_C_FLAGS + +this allows the user-specified CFLAGS/CXXFLAGS to take effect. +--- + CMakeLists.txt | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dbc0829..ba1c614 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,9 +17,8 @@ else() + endif() + + if (UNIX) +- set(CMAKE_C_FLAGS "-DLINUX -DUNIX -DHAVE_STDBOOL_H") ++ add_compile_definitions(LINUX UNIX HAVE_STDBOOL_H) + set(CMAKE_C_STANDARD 99) +- set(CMAKE_CXX_FLAGS "-DUNIX") + set(CMAKE_CXX_STANDARD 11) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) +-- +2.33.0 + -- cgit v1.2.3-70-g09d2