Skip to main content

In more simple case: print_properties TARGET:

 ---

(20200926: )
$ cd build
$ cmake ..
CMake Error: The current CMakeCache.txt directory / .../src/20200926/build/CMakeCache.txt is different than the directory /home/ .../src/20200924/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source "/ .../src/20200926/CMakeLists.txt" does not match the source "/ .../src/20200924/CMakeLists.txt" used to generate cache.  Re-run cmake with a different source directory.
$

--- CMakeLists.txt ---
cmake_minimum_required(VERSION 2.8.12.2)

project(lib_a)

#add_executable(Tutorial main.c)
#configure_file(TutorialConfig.h.in TutorialConfig.h)
#configure_file(array_counter.h.in array_counter.h)

set(wxSOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(wxBINARY_DIR ${CMAKE_BINARY_DIR})
set(wxOUTPUT_DIR ${wxBINARY_DIR}/lib)

print_properties ( TARGET, "../20200924" )
--- CMakeLists.txt ---

 

(20200927: )
Add includion of cmake_properties:
I could include but see error:


CMake Error at CMakeLists.txt:19 (print_properties):
  Unknown CMake command "print_properties".


-- Configuring incomplete, errors occurred!


ADD: include:

   get_cmake_property( _variableNames VARIABLES )
   foreach( _variableName ${_variableNames} )
      message( STATUS "${_variableName}=${${_variableName}}" )
   endforeach()

   include( PrintProperties )
   print_properties( TARGET "." )

---

(20200927: )
I check the specification: written as "cmake_print_properties".

https://cmake.org/cmake/help/v2.8.12/cmake.html#command:get_cmake_property
CMAKE_PRINT_PROPERTIES([TARGETS target1 .. targetN]

                        [SOURCES source1 .. sourceN]
                        [DIRECTORIES dir1 .. dirN]
                        [TESTS test1 .. testN]
                        [CACHE_ENTRIES entry1 .. entryN]
                        PROPERTIES prop1 .. propN )
This macro prints the values of the properties of the given targets, source files, directories, tests or cache entries. Exactly one of the scope keywords must be used. Example:

   cmake_print_properties(TARGETS foo bar PROPERTIES LOCATION INTERFACE_INCLUDE_DIRS)

This will print the LOCATION and INTERFACE_INCLUDE_DIRS properties for both targets foo and bar.  

---

(20200927: )
we don't know the reason the below, we can not find command.

CMake Error at CMakeLists.txt:13 (cmake_print_properties):
  Unknown CMake command "cmake_print_properties".


-- Configuring incomplete, errors occurred!
See also "/home/nakagawa/src/20200927/build/CMakeFiles/CMakeOutput.log".

---


(20200927: )
Anyway , we ignore "print_properties".
$ cmake ..
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/.../src/20200927/lib/build

---




Comments

Popular posts from this blog

ffmpeg: compilation: Makefile

1. Find sub-directory and ... 2. Care of the literature and ... * Parameter print - - - - CONFIG_POSTPROC - - - .PHONY ...  there is a file named  clean . ... - - - - - - - - - - - - .\Makefile File changed time Fri Jun 04 12:29:06 2021 1 :MAIN_MAKEFILE=1 2 :include config.mak 3 : 4 :vpath %.c $(SRC_PATH) 5 :vpath %.cpp $(SRC_PATH) 6 :vpath %.h $(SRC_PATH) 7 :vpath %.inc $(SRC_PATH) 8 :vpath %.m $(SRC_PATH) 9 :vpath %.S $(SRC_PATH) 10 :vpath %.asm $(SRC_PATH) 11 :vpath %.rc $(SRC_PATH) 12 :vpath %.v $(SRC_PATH) 13 :vpath %.texi $(SRC_PATH) 14 :vpath %/fate_config.sh.template $(SRC_PATH) 15 : 16 :AVPROGS-$(CONFIG_FFMPEG) += ffmpeg 17 :AVPROGS-$(CONFIG_FFPLAY) += ffplay 18 :AVPROGS-$(CONFIG_FFPROBE) += ffprobe 19 :AVPROGS-$(CONFIG_FFSERVER) += ffserver 20 : 21 :AVPROGS := $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF)) 22 :INSTPROGS = $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF)) ...

Big Leaves:

They are growing this year.Dirt is well for any leaves.Weirds are cut by the machine on the line. 2022/10/09 10:24:08 *

cmake-gui

We could yum-search cmake-gui, install it and boot it so that easily create project files for compilation, which means almost make files as configured: cmake-gui can use VERSION 3.6.1 if you add entry: message is the below: CMake Error: The source directory "...../read_005/src" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. We must create CMakeLists.txt but we can select "from UNIX makefile" as "Configure". "cmake-gui" itself is CMake 2.8.12.2 displayed. We could see CmakeCache.txt like the below so that we could not create tags by use of cmak-gui. ######################## # EXTERNAL cache entries ######################## cmake_minimum_required:STRING=VERSION 3.6.1 We'd rather love: cmake_minimum_required(VERSION 3.6.1) cmake-gui version itself must be higher, at least, we think.  (20200911: cmake3-gui) Configured and Generator: Now they are same. --- CMake Error: The source dir...