@@ -518,70 +518,6 @@ def test(self):
518518 assert "liba_utils: Release!" in c .out
519519
520520
521- @pytest .mark .skip (reason = "Just to report to CMake upstream, and CPS feature request" )
522- @pytest .mark .tool ("cmake" , "4.2" )
523- def test_pure_cmake_shared ():
524- c = TestClient ()
525-
526- cmake = textwrap .dedent ("""\
527- set(CMAKE_CXX_COMPILER_WORKS 1)
528- set(CMAKE_CXX_ABI_COMPILED 1)
529- cmake_minimum_required(VERSION 4.2)
530- project(myproj CXX)
531-
532- set(CMAKE_EXPERIMENTAL_EXPORT_PACKAGE_INFO "b80be207-778e-46ba-8080-b23bba22639e")
533-
534- # First library: core
535- add_library(mypkg_core src/mypkg_core.cpp)
536- target_include_directories(mypkg_core PUBLIC
537- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
538- $<INSTALL_INTERFACE:include/core>)
539- set_target_properties(mypkg_core PROPERTIES PUBLIC_HEADER "include/mypkg_core.h")
540-
541- # Second library: utils
542- add_library(mypkg_utils src/mypkg_utils.cpp)
543-
544- target_include_directories(mypkg_utils PUBLIC
545- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
546- $<INSTALL_INTERFACE:include/utils>)
547- set_target_properties(mypkg_utils PROPERTIES PUBLIC_HEADER "include/mypkg_utils.h")
548-
549- target_link_libraries(mypkg_utils PRIVATE mypkg_core)
550-
551- install(TARGETS mypkg_core EXPORT mypkg
552- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/core)
553- install(TARGETS mypkg_utils EXPORT mypkg
554- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/utils)
555-
556- install(PACKAGE_INFO mypkg EXPORT mypkg)
557- """ )
558-
559- # Create source files for both libraries
560- core_cpp = gen_function_cpp (name = "mypkg_core" )
561- core_h = gen_function_h (name = "mypkg_core" )
562- utils_cpp = gen_function_cpp (name = "mypkg_utils" , includes = ["mypkg_core" ],
563- calls = ["mypkg_core" ])
564- utils_h = gen_function_h (name = "mypkg_utils" )
565-
566- # First, try with the standard mypkg-config.cmake consumption
567- c .save ({"CMakeLists.txt" : cmake ,
568- "src/mypkg_core.cpp" : core_cpp ,
569- "include/mypkg_core.h" : core_h ,
570- "src/mypkg_utils.cpp" : utils_cpp ,
571- "include/mypkg_utils.h" : utils_h })
572-
573- c .run_command (f"cmake . -DBUILD_SHARED_LIBS=ON" )
574- print (c .out )
575- c .run_command ("cmake --build . --config Release" )
576- print (c .out )
577- c .run_command ("cmake --install . --config Release --prefix=mypkginstall" )
578- print (c .out )
579- cps = c .load ("mypkginstall/cps/mypkg.cps" )
580- print (cps )
581- cps_release = c .load ("mypkginstall/cps/mypkg@release.cps" )
582- print (cps_release )
583-
584-
585521@pytest .mark .tool ("cmake" , "4.2" )
586522def test_cps_name_mapping ():
587523 c = TestClient ()
0 commit comments