1
- # CMake 3.15 is required to support Corrosion
2
1
# CMake 3.19 is needed for file(REAL_PATH)
3
2
cmake_minimum_required (VERSION 3.19 )
4
3
@@ -33,43 +32,6 @@ include(cmake/PCRE2.cmake)
33
32
34
33
include (cmake/Rust.cmake )
35
34
36
- # Error out when linking statically, it doesn't work.
37
- if (CMAKE_EXE_LINKER_FLAGS MATCHES ".*-static.*" )
38
- message (FATAL_ERROR "Fish does not support static linking" )
39
- endif ()
40
-
41
- # Force colored warnings in Ninja's output, if the compiler has -fdiagnostics-color support.
42
- # Rationale in https://github.com/ninja-build/ninja/issues/814
43
- if (CMAKE_GENERATOR STREQUAL "Ninja" AND
44
- ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9 ) OR
45
- (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5 ) OR
46
- (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0 )))
47
- add_compile_options (-fdiagnostics-color=always )
48
- endif ()
49
-
50
- # Enable a whole bunch of warnings, but turn off:
51
- # - comment because we use a bunch of those, and they're not really all that harmful.
52
- # - address, because that occurs for our mkostemp check (weak-linking requires us to compare `&mkostemp == nullptr`).
53
- add_compile_options (-Wall -Wextra -Wno-comment -Wno-address )
54
-
55
- if ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang" ) OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" ))
56
- add_compile_options (-Wunused-template -Wunused-local-typedef -Wunused-macros )
57
- endif ()
58
-
59
- # Disable exception handling.
60
- add_compile_options (-fno-exceptions )
61
-
62
- # Hide the CMake Rules directories in Xcode projects.
63
- source_group ("CMake Rules" REGULAR_EXPRESSION "^$" )
64
-
65
- # Put source and header files at top level under targets.
66
- source_group ("Source Files" REGULAR_EXPRESSION ".*\\ .cpp" )
67
- source_group ("Header Files" REGULAR_EXPRESSION ".*\\ .h" )
68
- source_group ("Builtins" "builtins/" )
69
-
70
- # Support folders.
71
- set_property (GLOBAL PROPERTY USE_FOLDERS ON )
72
-
73
35
# Work around issue where archive-built libs go in the wrong place.
74
36
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR} )
75
37
@@ -89,9 +51,6 @@ get_filename_component(REAL_CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}" REALPATH)
89
51
add_definitions (-DCMAKE_BINARY_DIR= "${REAL_CMAKE_BINARY_DIR} " )
90
52
add_definitions (-DCMAKE_SOURCE_DIR= "${REAL_CMAKE_SOURCE_DIR} " )
91
53
92
- # Enable thread-safe errno on Solaris (#5611)
93
- add_definitions (-D_REENTRANT )
94
-
95
54
# cargo needs to be rerun when the sources change.
96
55
# This is imperfect, but the ninja generator really wants to
97
56
# not run cargo, so we need to tell it *something*
@@ -150,14 +109,5 @@ include(cmake/Install.cmake)
150
109
# Mac app.
151
110
include (cmake/MacApp.cmake )
152
111
153
- # ThreadSanitizer likes to muck with signal handlers, which interferes
154
- # with fish_test_helper printing the ignored signal mask.
155
- # Ensure fish_test_helper does not use TSan.
156
- # Note the environment var is CXXFLAGS, but the CMake var is CMAKE_CXX_FLAGS.
157
- if (CMAKE_CXX_FLAGS MATCHES ".*-fsanitize=thread.*" )
158
- target_compile_options (fish_test_helper PRIVATE "-fno-sanitize=all" )
159
- target_link_libraries (fish_test_helper "-fno-sanitize=all" )
160
- endif ()
161
-
162
112
include (FeatureSummary )
163
113
feature_summary (WHAT ALL )
0 commit comments