Class: MiniPortileFixedCMake
- Inherits:
-
MiniPortile
- Object
- MiniPortile
- MiniPortileFixedCMake
- Defined in:
- ext/libosrm/mini_portile_fixed_cmake.rb
Instance Method Summary collapse
- #configure ⇒ Object
- #configure_defaults ⇒ Object
- #configure_prefix ⇒ Object
- #configured? ⇒ Boolean
- #make_cmd ⇒ Object
-
#work_path ⇒ Object
def tmp_path “nya” end.
Instance Method Details
#configure ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'ext/libosrm/mini_portile_fixed_cmake.rb', line 16 def configure return if configured? cache_file = File.join(tmp_path, "configure.options_cache") File.open(cache_file, "w") { |f| f.write .to_s } #execute("configure", %w(cmake) + computed_options + [ "-Bbuild" ] + [ "-H." ]) execute("configure", %w(cmake) + + [ ".." ]) end |
#configure_defaults ⇒ Object
8 9 10 11 12 13 14 |
# File 'ext/libosrm/mini_portile_fixed_cmake.rb', line 8 def configure_defaults if MiniPortile.windows? [ '-G "NMake Makefiles"' ] else [ "-DBUILD_SHARED_LIBS=ON" ] end end |
#configure_prefix ⇒ Object
4 5 6 |
# File 'ext/libosrm/mini_portile_fixed_cmake.rb', line 4 def configure_prefix "-DCMAKE_INSTALL_PREFIX=#{File.(port_path)}" end |
#configured? ⇒ Boolean
26 27 28 29 30 31 32 33 34 35 |
# File 'ext/libosrm/mini_portile_fixed_cmake.rb', line 26 def configured? configure = File.join(work_path, "configure") makefile = File.join(work_path, "CMakefile") cache_file = File.join(tmp_path, "configure.options_cache") = File.exist?(cache_file) ? File.read(cache_file) : "" = .to_s ( == ) && newer?(makefile, configure) end |
#make_cmd ⇒ Object
37 38 39 40 |
# File 'ext/libosrm/mini_portile_fixed_cmake.rb', line 37 def make_cmd return "nmake" if MiniPortile.windows? super end |
#work_path ⇒ Object
def tmp_path
"nya"
end
46 47 48 49 50 |
# File 'ext/libosrm/mini_portile_fixed_cmake.rb', line 46 def work_path orig = super Dir.mkdir "#{orig}/build" unless Dir.exist? "#{orig}/build" "#{orig}/build" end |