Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 4.2k
    • Issues 4.2k
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Issues
  • #18848
Closed
Open
Issue created Jan 28, 2019 by Ben Langmuir@benlangmuir

install: Marking a FRAMEWORK after install() causes assertion failure

Assertion failed: (this->NamelinkMode == NamelinkModeNone), function GenerateScriptForConfig, file ../Source/cmInstallTargetGenerator.cxx, line 214.

Asserts in cmake-3.12.2 and cmake-3.13.3. Does not assert in cmake-3.9.3

If you call install(TARGETS foo ...) on a target before calling set_target_properties(foo PROPERTIES FRAMEWORK TRUE), it triggers an assertion failure in cmake. You can workaround the issue by moving the call to install after the call to set_target_properties.

Reproducer:

$ touch t.cpp

$ cat CMakeLists.txt
cmake_minimum_required(VERSION 3.9)
add_library(sourcekitd SHARED t.cpp)
install(TARGETS sourcekitd
  FRAMEWORK DESTINATION lib
  LIBRARY DESTINATION lib)
set_target_properties(sourcekitd PROPERTIES
  FRAMEWORK TRUE)

$ cmake .
-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode/External/10A255/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode/External/10A255/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode/External/10A255/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode/External/10A255/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
Assertion failed: (this->NamelinkMode == NamelinkModeNone), function GenerateScriptForConfig, file ../Source/cmInstallTargetGenerator.cxx, line 214.
Abort trap: 6
Edited Jan 29, 2019 by Brad King
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking