diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-14 21:29:35 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-15 00:08:11 +0200 |
| commit | 5a7e245d3cd829e093fed6ccd8cac4606cbb7fa9 (patch) | |
| tree | 89dcb5b6021f22e865f1acbef3fe61ac9cd6bbf9 | |
| parent | cmake: more precise minimum version detection (diff) | |
| download | windows7-drivers-5a7e245d3cd829e093fed6ccd8cac4606cbb7fa9.tar.gz windows7-drivers-5a7e245d3cd829e093fed6ccd8cac4606cbb7fa9.zip | |
um: remove cmake-common
I'm having trouble making the latest versions work on the older Appveyor
images + I'm not using Boost here anyway, so it kinda loses its utility.
| -rw-r--r-- | .appveyor.yml | 22 | ||||
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rw-r--r-- | CMakeLists.txt | 8 | ||||
| -rw-r--r-- | scripts/build.ps1 | 1 | ||||
| -rw-r--r-- | um/CMakeLists.txt | 5 | ||||
| m--------- | um/cmake | 0 | ||||
| -rw-r--r-- | um/service/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | um/service/utils/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | um/wrappers/nt_namespace/utils/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | um/wrappers/simple/utils/CMakeLists.txt | 5 |
11 files changed, 36 insertions, 20 deletions
diff --git a/.appveyor.yml b/.appveyor.yml index add6b7e..bcfb6f6 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,8 +9,6 @@ image: Visual Studio 2013 # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) environment: - global: - python_exe: C:\Python36-x64\python.exe matrix: - TARGET_OS: Win7 - TARGET_OS: Win8 @@ -36,18 +34,26 @@ install: - git submodule update --init --recursive build_script: - - cd um\cmake - - '"%python_exe%" -m project.ci.cmake --install' - - cd ..\.. - ps: | + cd $Env:APPVEYOR_BUILD_FOLDER + New-Item -Type Directory build\cmake | Out-Null + cd build\cmake + + cmake -A $Env:PLATFORM ` + "-DCMAKE_INSTALL_PREFIX=$Env:APPVEYOR_BUILD_FOLDER\build\install" ` + $Env:APPVEYOR_BUILD_FOLDER + + cmake --build . --target install --config $Env:CONFIGURATION + - ps: | + cd $Env:APPVEYOR_BUILD_FOLDER .\scripts\build.ps1 ` - -InstallDir ..\build\install ` + -InstallDir .\build\install ` -Configuration "$Env:TARGET_OS $Env:CONFIGURATION" ` -Platform $Env:PLATFORM ` -WDK wdk8.1update after_build: - - 7z.exe a "%APPVEYOR_PROJECT_NAME%-%PLATFORM%-%CONFIGURATION%-%TARGET_OS%.zip" "..\build\install\*" + - 7z.exe a "%APPVEYOR_PROJECT_NAME%-%PLATFORM%-%CONFIGURATION%-%TARGET_OS%.zip" .\build\install\* - appveyor.exe PushArtifact "%APPVEYOR_PROJECT_NAME%-%PLATFORM%-%CONFIGURATION%-%TARGET_OS%.zip" for: @@ -72,4 +78,4 @@ for: - ps: Start-Sleep -s 10 - appveyor.exe AddMessage "OK" test_script: - - ps: .\scripts\test.ps1 -InstallDir ..\build\install + - ps: .\scripts\test.ps1 -InstallDir build\install diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..84c048a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 2ede939..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "um/cmake"] - path = um/cmake - url = https://github.com/egor-tensin/cmake-common.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 7725cb3..c1323f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,14 @@ endif() project(win7drv CXX) +if(MSVC) + add_compile_options(/MP /W4) +else() + add_compile_options(-Wall -Wextra) +endif() + +add_compile_definitions(NOMINMAX) + add_subdirectory(um) install(FILES LICENSE.txt DESTINATION share) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 900a2d3..3cfc554 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -86,6 +86,7 @@ function Build-Project { $appveyor_cwd = pwd } + New-Item -ItemType Directory -Force $script:InstallDir | Out-Null $script:InstallDir = (Resolve-Path $script:InstallDir).Path try { diff --git a/um/CMakeLists.txt b/um/CMakeLists.txt index b5df409..a5f20d6 100644 --- a/um/CMakeLists.txt +++ b/um/CMakeLists.txt @@ -1,7 +1,2 @@ -# WIN32_LEAN_AND_MEAN shouldn't be defined, it masks CTL_CODE: -set(CC_WINDOWS_DEF OFF) - -include(cmake/common.cmake) - add_subdirectory(service) add_subdirectory(wrappers) diff --git a/um/cmake b/um/cmake deleted file mode 160000 -Subproject a7dd03f2da53016b56f1cf99c0c3959f6ae3f2d diff --git a/um/service/CMakeLists.txt b/um/service/CMakeLists.txt index ff3f4f4..d6ffdbc 100644 --- a/um/service/CMakeLists.txt +++ b/um/service/CMakeLists.txt @@ -1,7 +1,6 @@ file(GLOB_RECURSE service_include "include/*.hpp") file(GLOB service_src "src/*.cpp") add_library(service ${service_src} ${service_include}) -target_compile_definitions(service PRIVATE NOMINMAX) target_include_directories(service PUBLIC include/) add_subdirectory(test) diff --git a/um/service/utils/CMakeLists.txt b/um/service/utils/CMakeLists.txt index 95a3e48..0557f95 100644 --- a/um/service/utils/CMakeLists.txt +++ b/um/service/utils/CMakeLists.txt @@ -7,7 +7,10 @@ function(add_util action src) set_target_properties("${target}" PROPERTIES OUTPUT_NAME "${name}") install(TARGETS "${target}" RUNTIME DESTINATION bin) - install_pdbs(TARGETS "${target}" DESTINATION bin) + if(MSVC) + install(FILES $<TARGET_PDB_FILE:${target}> + DESTINATION bin OPTIONAL) + endif() endfunction() add_util(install install_service.cpp) diff --git a/um/wrappers/nt_namespace/utils/CMakeLists.txt b/um/wrappers/nt_namespace/utils/CMakeLists.txt index 46e9b5e..0af13d8 100644 --- a/um/wrappers/nt_namespace/utils/CMakeLists.txt +++ b/um/wrappers/nt_namespace/utils/CMakeLists.txt @@ -7,4 +7,7 @@ if(MINGW) endif() install(TARGETS nt_namespace_convert RUNTIME DESTINATION bin) -install_pdbs(TARGETS nt_namespace_convert DESTINATION bin) +if(MSVC) + install(FILES $<TARGET_PDB_FILE:nt_namespace_convert> + DESTINATION bin OPTIONAL) +endif() diff --git a/um/wrappers/simple/utils/CMakeLists.txt b/um/wrappers/simple/utils/CMakeLists.txt index 6aafb9a..4660488 100644 --- a/um/wrappers/simple/utils/CMakeLists.txt +++ b/um/wrappers/simple/utils/CMakeLists.txt @@ -3,4 +3,7 @@ target_link_libraries(simple_exchange_ints PRIVATE simple) set_target_properties(simple_exchange_ints PROPERTIES OUTPUT_NAME exchange_ints) install(TARGETS simple_exchange_ints RUNTIME DESTINATION bin) -install_pdbs(TARGETS simple_exchange_ints DESTINATION bin) +if(MSVC) + install(FILES $<TARGET_PDB_FILE:simple_exchange_ints> + DESTINATION bin OPTIONAL) +endif() |
