diff --git a/cmake/mig.cmake b/cmake/mig.cmake index e80f5a8e4..d4105b400 100644 --- a/cmake/mig.cmake +++ b/cmake/mig.cmake @@ -1,5 +1,5 @@ function(mig defFileName) - set(MIG_EXECUTABLE "${CMAKE_BINARY_DIR}/mig") + set(MIG_EXECUTABLE "${CMAKE_BINARY_DIR}/build-mig") if (NOT MIG_USER_SOURCE_SUFFIX) set (MIG_USER_SOURCE_SUFFIX "User.c") diff --git a/src/bootstrap_cmds/CMakeLists.txt b/src/bootstrap_cmds/CMakeLists.txt index 32d33b259..a7d6cf23a 100644 --- a/src/bootstrap_cmds/CMakeLists.txt +++ b/src/bootstrap_cmds/CMakeLists.txt @@ -43,16 +43,16 @@ add_custom_command( #TARGET migcom #POST_BUILD #DEPENDS migcom - OUTPUT "${CMAKE_BINARY_DIR}/mig" + OUTPUT "${CMAKE_BINARY_DIR}/build-mig" DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/migcom.tproj/mig.sh" COMMAND awk -v "migcc=${CMAKE_C_COMPILER}" -v "migcom=${CMAKE_CURRENT_BINARY_DIR}/migcom" -f "${CMAKE_CURRENT_SOURCE_DIR}/migcom.tproj/mig.awk" - "${CMAKE_CURRENT_SOURCE_DIR}/migcom.tproj/mig.sh" ">${CMAKE_BINARY_DIR}/mig" - && chmod 0755 "${CMAKE_BINARY_DIR}/mig" + "${CMAKE_CURRENT_SOURCE_DIR}/migcom.tproj/mig.sh" ">${CMAKE_BINARY_DIR}/build-mig" + && chmod 0755 "${CMAKE_BINARY_DIR}/build-mig" ) -add_custom_target(migexe DEPENDS "${CMAKE_BINARY_DIR}/mig") +add_custom_target(migexe DEPENDS "${CMAKE_BINARY_DIR}/build-mig") add_dependencies(migexe migcom) diff --git a/src/copyfile/CMakeLists.txt b/src/copyfile/CMakeLists.txt index 5591f548b..12b4f3ec9 100644 --- a/src/copyfile/CMakeLists.txt +++ b/src/copyfile/CMakeLists.txt @@ -2,7 +2,7 @@ project(copyfile) cmake_minimum_required(VERSION 2.4.0) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc -fblocks") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib") include_directories(${CMAKE_SOURCE_DIR}/platform-include) @@ -18,8 +18,8 @@ add_definitions(-D__APPLE__ -D__DYNAMIC__) # Hide warnings add_definitions( - -Wno-parentheses - -Wno-int-conversion + -w + -nostdinc ) set(copyfile_sources diff --git a/src/dyld/CMakeLists.txt b/src/dyld/CMakeLists.txt index f59f0e9a8..8894730d6 100644 --- a/src/dyld/CMakeLists.txt +++ b/src/dyld/CMakeLists.txt @@ -8,8 +8,9 @@ endif(COMMAND cmake_policy) include (darling_exe) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc -std=c++11 -include ${CMAKE_SOURCE_DIR}/src/duct/include/CrashReporterClient.h") +add_definitions(-nostdinc) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -include ${CMAKE_SOURCE_DIR}/src/duct/include/CrashReporterClient.h") set(CMAKE_SHARED_LINKER_FLAGS_SAVED "${CMAKE_SHARED_LINKER_FLAGS}") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,-bind_at_load -Wl,-flat_namespace -Wl,-undefined,suppress") diff --git a/src/external/SecurityTokend b/src/external/SecurityTokend index 759305956..9e8c88f2b 160000 --- a/src/external/SecurityTokend +++ b/src/external/SecurityTokend @@ -1 +1 @@ -Subproject commit 759305956b8a881604171f6a72d08a4947a2bd32 +Subproject commit 9e8c88f2ba75f329956bb48e61bee14c1e08a7eb diff --git a/src/external/cocotron b/src/external/cocotron index 0d0fbfd06..d5496c73f 160000 --- a/src/external/cocotron +++ b/src/external/cocotron @@ -1 +1 @@ -Subproject commit 0d0fbfd0601dcdd625d136f329d54b8f2569df3f +Subproject commit d5496c73f313a1604492c09f40d745dab898f7d4 diff --git a/src/external/iokitd b/src/external/iokitd index 7024effe7..f382cc2c2 160000 --- a/src/external/iokitd +++ b/src/external/iokitd @@ -1 +1 @@ -Subproject commit 7024effe7793755a8259e150c94867b2210636f0 +Subproject commit f382cc2c201de573e047c33638f1d754a67ccd79 diff --git a/src/external/vim b/src/external/vim index 476b532b3..b691e8246 160000 --- a/src/external/vim +++ b/src/external/vim @@ -1 +1 @@ -Subproject commit 476b532b3156df78c3c38a5e2dac960c9b1f87c2 +Subproject commit b691e824662428cd9e76fd4c6a68be0f4fa52ac3 diff --git a/src/launchd/liblaunch/CMakeLists.txt b/src/launchd/liblaunch/CMakeLists.txt index a7a6258ba..5cdd834bc 100644 --- a/src/launchd/liblaunch/CMakeLists.txt +++ b/src/launchd/liblaunch/CMakeLists.txt @@ -7,8 +7,9 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../src ) +add_definitions(-w -nostdinc) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks -nostdinc -include ${CMAKE_SOURCE_DIR}/kernel-include/sys/fileport.h -ggdb") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks -include ${CMAKE_SOURCE_DIR}/kernel-include/sys/fileport.h -ggdb") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,-flat_namespace -Wl,-undefined,suppress") mig(job.defs) diff --git a/src/launchd/src/CMakeLists.txt b/src/launchd/src/CMakeLists.txt index 135a04a36..9cd5da911 100644 --- a/src/launchd/src/CMakeLists.txt +++ b/src/launchd/src/CMakeLists.txt @@ -7,15 +7,8 @@ if(COMMAND cmake_policy) endif(COMMAND cmake_policy) add_definitions( - -Wno-macro-redefined - -Wno-shift-negative-value - -Wno-int-conversion - -Wno-format - -Wno-tautological-compare - -Wno-deprecated-declarations - -Wextra-tokens - -Wpointer-bool-conversion - -Wno-implicit-function-declaration + -w + -nostdinc ) include_directories( @@ -24,7 +17,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/external/libxpc ) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks -nostdinc -include ${CMAKE_SOURCE_DIR}/kernel-include/sys/fileport.h") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks -include ${CMAKE_SOURCE_DIR}/kernel-include/sys/fileport.h") mig(job.defs) mig(helper.defs) diff --git a/src/launchd/support/CMakeLists.txt b/src/launchd/support/CMakeLists.txt index 40b0b86fb..36d24574c 100644 --- a/src/launchd/support/CMakeLists.txt +++ b/src/launchd/support/CMakeLists.txt @@ -7,16 +7,14 @@ if(COMMAND cmake_policy) endif(COMMAND cmake_policy) add_definitions( - -Wno-extra-tokens - -Wno-pointer-bool-conversion - -Wno-implicit-function-declaration + -w -nostdinc ) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../liblaunch/) include_directories(${CMAKE_CURRENT_BINARY_DIR}) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fblocks -nostdinc -include ${CMAKE_SOURCE_DIR}/kernel-include/sys/fileport.h") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fblocks -include ${CMAKE_SOURCE_DIR}/kernel-include/sys/fileport.h") add_definitions(-DPRIVATE) diff --git a/src/libinfo/CMakeLists.txt b/src/libinfo/CMakeLists.txt index 3cf9858c6..e9b3508b5 100644 --- a/src/libinfo/CMakeLists.txt +++ b/src/libinfo/CMakeLists.txt @@ -17,12 +17,10 @@ add_definitions(-D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=1080) add_definitions(-DDS_AVAILABLE) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc -D__DARWIN_UNIX03 -fPIC -ggdb") -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib") +add_definitions(-w -nostdinc) -add_compile_options( - -Wno-macro-redefined -) +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__DARWIN_UNIX03 -fPIC -ggdb") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib") include_directories(${CMAKE_SOURCE_DIR}/src/libc/darwin) include_directories(${CMAKE_SOURCE_DIR}/src/kernel/libsyscall/wrappers) diff --git a/src/libnotify/CMakeLists.txt b/src/libnotify/CMakeLists.txt index 1727c2a30..2e6bfdc3e 100644 --- a/src/libnotify/CMakeLists.txt +++ b/src/libnotify/CMakeLists.txt @@ -12,7 +12,9 @@ include_directories(${CMAKE_SOURCE_DIR}/src/libc/darwin) include_directories(${CMAKE_SOURCE_DIR}/src/external/libclosure) include_directories(${CMAKE_SOURCE_DIR}/src/kernel/libsyscall/wrappers) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks -nostdinc -include ${DARLING_TOP_DIRECTORY}/kernel-include/sys/fileport.h") +add_definitions(-nostdinc -w) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks -include ${DARLING_TOP_DIRECTORY}/kernel-include/sys/fileport.h") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib") mig(notify_ipc.defs) diff --git a/src/libremovefile/CMakeLists.txt b/src/libremovefile/CMakeLists.txt index 8c6ada515..95357e3ee 100644 --- a/src/libremovefile/CMakeLists.txt +++ b/src/libremovefile/CMakeLists.txt @@ -11,9 +11,11 @@ include_directories(${CMAKE_SOURCE_DIR}/src/libc/locale/FreeBSD) include_directories(${CMAKE_SOURCE_DIR}/src/libc/locale) include_directories(${CMAKE_SOURCE_DIR}/src/kernel/libsyscall/wrappers) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks -nostdinc") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib") +add_definitions(-w -nostdinc) + set(removefile_sources removefile.c removefile_random.c diff --git a/src/libsystem/CMakeLists.txt b/src/libsystem/CMakeLists.txt index e6a5b0495..f5d5ed8cd 100644 --- a/src/libsystem/CMakeLists.txt +++ b/src/libsystem/CMakeLists.txt @@ -7,7 +7,7 @@ if(COMMAND cmake_policy) endif(COMMAND cmake_policy) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc -ggdb") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,-bind_at_load") include_directories(${CMAKE_SOURCE_DIR}/src/libc/fbsdcompat) @@ -23,9 +23,8 @@ add_definitions(-D__APPLE__ -D__DYNAMIC__) # Hide warnings add_definitions( - -Wno-implicit-function-declaration - -Wno-incompatible-pointer-types-discards-qualifiers - -Wno-incompatible-pointer-types + -w + -nostdinc ) set(libsystem_sources diff --git a/src/pboard/CMakeLists.txt b/src/pboard/CMakeLists.txt index 95ad2f2ba..070d4ca23 100644 --- a/src/pboard/CMakeLists.txt +++ b/src/pboard/CMakeLists.txt @@ -1,8 +1,6 @@ project(pboard) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc") - -include(darling_exe) +add_definitions(-nostdinc) add_darling_executable(pbcopy pbcopy.m) target_link_libraries(pbcopy AppKit Foundation objc) diff --git a/src/private-frameworks/DiskImages/CMakeLists.txt b/src/private-frameworks/DiskImages/CMakeLists.txt index cbb75713d..e0ecc5add 100644 --- a/src/private-frameworks/DiskImages/CMakeLists.txt +++ b/src/private-frameworks/DiskImages/CMakeLists.txt @@ -2,7 +2,6 @@ project(DiskImages) add_compile_options( -nostdinc - -mmacosx-version-min=10.10 ) set(DYLIB_COMPAT_VERSION "1.0.8") diff --git a/src/unxip/CMakeLists.txt b/src/unxip/CMakeLists.txt index 40fd16f23..cbfcd71a0 100644 --- a/src/unxip/CMakeLists.txt +++ b/src/unxip/CMakeLists.txt @@ -1,6 +1,6 @@ project(unxip) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc") +add_definitions(-nostdinc) include_directories( ${CMAKE_SOURCE_DIR}/src/xar diff --git a/src/vchroot/CMakeLists.txt b/src/vchroot/CMakeLists.txt index cfd1675fd..9bc3fafde 100644 --- a/src/vchroot/CMakeLists.txt +++ b/src/vchroot/CMakeLists.txt @@ -1,7 +1,7 @@ project(vchroot) include(darling_exe) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc") +add_definitions(-nostdinc) add_darling_executable(vchroot vchroot.c) target_link_libraries(vchroot system) diff --git a/src/xtrace/CMakeLists.txt b/src/xtrace/CMakeLists.txt index dd115fe0b..e055ee37c 100644 --- a/src/xtrace/CMakeLists.txt +++ b/src/xtrace/CMakeLists.txt @@ -1,7 +1,8 @@ project(xtrace) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc -fno-exceptions -fno-rtti -std=c++11") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti -std=c++11") + +add_definitions(-nostdinc) include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/include