Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,290
    • Issues 3,290
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 12
    • Merge Requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #17007

Closed
Open
Created Jun 22, 2017 by Mika Fischer@mikafischer

GetPrerequisites outputs lots of warnings when used with Windows UCRT if recursive parameter is 0

Example CMakeLists.txt:

cmake_minimum_required(VERSION 3.8)
project(foo)

set(CPP_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/foo.cpp")
file(WRITE "${CPP_FILENAME}" "int main() {}")
add_executable(foo "${CPP_FILENAME}")

set(SCRIPT_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/dependencies-$<CONFIG>.cmake")
file(GENERATE OUTPUT "${SCRIPT_FILENAME}" CONTENT "
include(GetPrerequisites)
get_prerequisites(\"$<TARGET_FILE:foo>\" PREREQUISITES 1 0 \"\" \"\")
message(STATUS \"Prerequisites: \\\"\${PREREQUISITES}\\\"\")
")
add_custom_command(TARGET foo POST_BUILD COMMAND "${CMAKE_COMMAND}" -P "${SCRIPT_FILENAME}")

Output:

λ mkdir build && cd build && cmake --version && cmake .. && cmake --build . --config Release -- /v:m /nologo
cmake version 3.9.0-rc3

CMake suite maintained and supported by Kitware (kitware.com/cmake).
-- Building for: Visual Studio 14 2015
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/mfischer/src/videmo/cmake-bug/build
  Checking Build System
  CMake does not need to re-run because C:/Users/mfischer/src/videmo/cmake-bug/build/CMakeFiles/generate.stamp is up-to-date.
  Building Custom Rule C:/Users/mfischer/src/videmo/cmake-bug/CMakeLists.txt
  CMake does not need to re-run because C:/Users/mfischer/src/videmo/cmake-bug/build/CMakeFiles/generate.stamp is up-to-date.
  foo.cpp
  foo.vcxproj -> C:\Users\mfischer\src\videmo\cmake-bug\build\Release\foo.exe
  --
EXEC : warning : cannot resolve item 'api-ms-win-crt-runtime-l1-1-0.dll' [C:\Users\mfischer\src\videmo\cmake-bug\build\foo.vcxproj]

    possible problems:
      need more directories?
      need to use InstallRequiredSystemLibraries?
      run in install tree instead of build tree?

EXEC : -- warning : gp_resolved_file_type non-absolute file 'api-ms-win-crt-runtime-l1-1-0.dll' returning type 'system' -- possibly incorrect [C:\Users\mfischer\src\videmo\cmake-bug\build\foo.vcxproj]
  --
EXEC : warning : cannot resolve item 'api-ms-win-crt-math-l1-1-0.dll' [C:\Users\mfischer\src\videmo\cmake-bug\build\foo.vcxproj]

    possible problems:
      need more directories?
      need to use InstallRequiredSystemLibraries?
      run in install tree instead of build tree?

EXEC : -- warning : gp_resolved_file_type non-absolute file 'api-ms-win-crt-math-l1-1-0.dll' returning type 'system' -- possibly incorrect [C:\Users\mfischer\src\videmo\cmake-bug\build\foo.vcxproj]
  --
EXEC : warning : cannot resolve item 'api-ms-win-crt-stdio-l1-1-0.dll' [C:\Users\mfischer\src\videmo\cmake-bug\build\foo.vcxproj]

    possible problems:
      need more directories?
      need to use InstallRequiredSystemLibraries?
      run in install tree instead of build tree?

EXEC : -- warning : gp_resolved_file_type non-absolute file 'api-ms-win-crt-stdio-l1-1-0.dll' returning type 'system' -- possibly incorrect [C:\Users\mfischer\src\videmo\cmake-bug\build\foo.vcxproj]
  --
EXEC : warning : cannot resolve item 'api-ms-win-crt-locale-l1-1-0.dll' [C:\Users\mfischer\src\videmo\cmake-bug\build\foo.vcxproj]

    possible problems:
      need more directories?
      need to use InstallRequiredSystemLibraries?
      run in install tree instead of build tree?

EXEC : -- warning : gp_resolved_file_type non-absolute file 'api-ms-win-crt-locale-l1-1-0.dll' returning type 'system' -- possibly incorrect [C:\Users\mfischer\src\videmo\cmake-bug\build\foo.vcxproj]
  --
EXEC : warning : cannot resolve item 'api-ms-win-crt-heap-l1-1-0.dll' [C:\Users\mfischer\src\videmo\cmake-bug\build\foo.vcxproj]

    possible problems:
      need more directories?
      need to use InstallRequiredSystemLibraries?
      run in install tree instead of build tree?

EXEC : -- warning : gp_resolved_file_type non-absolute file 'api-ms-win-crt-heap-l1-1-0.dll' returning type 'system' -- possibly incorrect [C:\Users\mfischer\src\videmo\cmake-bug\build\foo.vcxproj]
  -- Prerequisites: ""
  Building Custom Rule C:/Users/mfischer/src/videmo/cmake-bug/CMakeLists.txt
  CMake does not need to re-run because C:/Users/mfischer/src/videmo/cmake-bug/build/CMakeFiles/generate.stamp is up-to-date.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None